<?php
Session_start();
//View
require_once ("View/loginview.php");
require_once ("View/navigationview.php");
require_once ("View/EventView.php");
//Handler
require_once ("Handler/loginHandler.php");
require_once ("Handler/EventHandler.php");
//controller
require_once ("Controller/loginController.php");
require_once ("Controller/NewUserController.php");
require_once ("Controller/EventController.php");
$body = "";
$header = "";
//anrop - view
$NavigationView = new NavigationView();
//anrop - Handler
$LoginHandler = new LoginHandler();
//anrop - Controller
$LoginController = new LoginController();
if ($NavigationView -> IsRegisterControllerActive() == true) {

	$RegisterController = new RegisterController();
	$UserHandler = new UserHandler();
	$RegisterView = new RegisterView();
	$body = $RegisterView -> NewUserBox();
	$title = "Ny medlem";
	$RegisterView -> GetUserName();
	$body .= $RegisterController -> DoControllNewUser();

} elseif ($NavigationView -> IsEventControllerActive() == true) {
	$EventController = new EventController();
	$EventHandler = new EventHandler();
	$EventView = new EventView();
	$body = $EventController -> EventController();
	$title = "Evenemang";
	$header = "Anmälning";

} else {
	$header = "Evenemangskalender";
	$title = "Inloggingsida";
	$LoginView = new LoginView();
	$LoginView -> GetUserName();
	$LoginHandler = new LoginHandler();
	$body = $LoginController -> DoControll();

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="css/reset.css" />
		<link rel="stylesheet" type="text/css" href="css/basic.css" />
		<link href='http://fonts.googleapis.com/css?family=Neuton' rel='stylesheet' type='text/css'>
		<title>Evenamngskalendern</title>
	</head>
	<body>
		<div class="conteiner">
			<div class="header">
			
			
			<h1>Max's event</h1>
			<h2>Din Bokningsplats på nätet</h2>
			
				<h3><?php echo $header?></h3>
				
			</div>
			<div class="Main">
					<div class="login">
						<?php
							//Skriver ut innehållet i $body till dokumentet.
							echo $body;
						?>
					</div>
				</div>
				<div class="Footer">
					
				</div>
			
		</div>
	</body>
</html>
